<?php /* Smarty version 2.6.18, created on 2015-09-09 18:15:24
         compiled from announceAddTags.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "top.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "left.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="javascript:void(0);">公告编辑</a>
							</li>
							<li class="active"><a href="javascript:void(0);">添加标签</a></li>
						</ul><!-- .breadcrumb -->
					</div>

					<div class="page-content">

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								
								<div class="row">
									<div class="col-sm-12">
										<div class="widget-box">
											<div class="widget-header header-color-blue2">
												<h4 class="lighter smaller"></h4>
											</div>

											<div class="widget-body">
												<div class="widget-main ">

													<form class="form-horizontal" role="form">
														<br/>
														<div class="form-group">
															<label class="col-sm-5 control-label no-padding-right" for="form-field-5">标签名称:</label>

															<div class="col-sm-6">
																<div class="clearfix">
																	<input class="col-xs-3" type="text" id="tagsName" placeholder="" />
																</div>


																<div class="help-block" id="inputGameName"></div>
															</div>
														</div>
														
														<!--  
														<div class="form-group">
															<label class="col-sm-5 control-label no-padding-right" for="form-field-5">支持平台:</label>

															<div class="col-sm-6">
																<div class="clearfix">
																	<input class="col-xs-6" type="text" id="platform" placeholder="" />
																</div>


																<div class="help-block" id="inputGamePlatform"></div>
															</div>
														</div>
														<div class="form-group">
															<label class="col-sm-5 control-label no-padding-right" for="form-field-5">支持渠道:</label>

															<div class="col-sm-6">
																<div class="clearfix">
																	<input class="col-xs-6" type="text" id="channel" placeholder="" />
																</div>

																<div class="help-block" id="inputGameChannel"></div>
															</div>
														</div>
														<div class="form-group">
															<label class="col-sm-5 control-label no-padding-right" for="form-field-5">日志用户:</label>

															<div class="col-sm-6">
																<div class="clearfix">
																	<input class="col-xs-3" type="text" id="logUserName" placeholder="" />
																</div>


																<div class="help-block" id="inputLogUserName"></div>
															</div>
														</div>
														<div class="form-group">
															<label class="col-sm-5 control-label no-padding-right" for="form-field-5">日志密码:</label>

															<div class="col-sm-6">
																<div class="clearfix">
																	<input class="col-xs-3" type="text" id="logUserPwd" placeholder="" />
																</div>

																<div class="help-block" id="inputLogUserPwd"></div>
															</div>
														</div>
														
														<div class="form-group">
															<label class="col-sm-5 control-label no-padding-right" for="form-field-5">部署路径:</label>

															<div class="col-sm-6">
																<div class="clearfix">
																	<input class="col-xs-3" type="text" id="logPath" placeholder="" />
																</div>

																<div class="help-block" id="inputLogPath"></div>
															</div>
														</div>
														
														<div class="form-group">
															<label class="col-sm-5 control-label no-padding-right" for="form-field-5">脚本端口:</label>

															<div class="col-sm-6">
																<div class="clearfix">
																	<input class="col-xs-3" type="text" id="sshPort" placeholder="" />
																</div>


																<div class="help-block" id="inputSshPort"></div>
															</div>
														</div>
														-->
														
													</form>

													<h3 class="header smaller lighter green"></h3>
													<div class="clearfix">
														<center>
															<button type="button" onClick="formSubmit();" class="btn btn-info btn-success">
																<!--<i class="icon-bolt"></i>-->
																添加
															</button>
														</center>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
		<script type="text/javascript">

			jQuery(function($) {
	/*			inputSlider($('#inputGameName'), $('#game'));
				inputSlider($('#inputGamePlatform'), $('#platform'));
				inputSlider($('#inputGameChannel'), $('#channel'));
				inputSlider($('#inputLogUserName'), $('#logUserName'));
				inputSlider($('#inputLogUserPwd'), $('#logUserPwd'));
				inputSlider($('#inputLogPath'), $('#logPath'));
				inputSlider($('#inputSshPort'), $('#sshPort'));
	*/	
			});

			function inputSlider(inputNode, sliderNode) {
				inputNode.slider({
					value:3,
					range: "min",
					min: 3,
					max: 12,
					step: 1,
					slide: function( event, ui ) {
						var val = parseInt(ui.value);
						sliderNode.attr('class', 'col-xs-'+val);
					}
				});
			}

			function formSubmit() {
				var param = {};
				param['mod'] = 'Announce';
				param['do']  = 'addTags';
				
				param['action'] 	= 1;
				param['tagsName'] 	= $('#tagsName').val();
				
				if (!param['tagsName']) {
					alert("请输入标签名称");
				} else {
					$.ajax({
						type:'POST',
						url:'index.php',
						data:param,
						dataType:'html',
						success:function(data) {
							var dataObj = eval("(" + data + ")");//转换为json对象
							if(dataObj.code == 1) {
								alert(dataObj.msg);
								window.location.href = "index.php?mod=Announce&do=manageTags";
							} else {
								alert(dataObj.msg);
							}
						}
					});
				}
			}
			
		</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
